using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace FrameWork
{
    public class AudioModule : BaseModule
    {
        private IAudioHelper _audioHelper;

        public override void Init()
        {

        }

        public override void ShutDown()
        {

        }

        public override void Update(float deltaTime, float realDeltaTime)
        {
            
        }

        /// <summary>
        /// 注册AudioHelper,将Mono和逻辑隔离
        /// </summary>
        public void RegisterHelper(IAudioHelper iaudioHelper)
        {
            this._audioHelper = iaudioHelper;
        }

        public void PlayBGM(string bgmName, float volume, float delay)
        {
            _audioHelper.PlayBGM(bgmName, volume, delay);
        }

        public void PlaySound(string soundName, float volume, float delay)
        {
            //_audioHelper.PlaySound(soundName,volume,delay);
        }
    }
}

